﻿using System;

namespace FlickrXplorer.Web.Plugin
{
  /// <summary>
  /// The base class for all <see cref="FlickrXplorer.Web.Plugin.FlickrXplorerPlugin" text="FlickrXplorerPlugin" />
  /// events.
  /// </summary>
  /// <value>
  /// All plugin event arguments are derived from this class. The
  /// most important property is <see cref="FlickrXplorer.Web.Plugin.PluginEventArgs.Content" text="Content" />,
  /// which holds the output content of a plugin.
  /// </value>
  /// <see cref="FlickrXplorer.Web.Plugin.LoadMainPhotoEventArgs" text="LoadMainPhotoEventArgs Class" />
  /// 
  /// <see cref="FlickrXplorer.Web.Plugin.LoadSidebarEventArgs" text="LoadSidebarEventArgs Class" />
  ///                                                                                                              
  public abstract class PluginEventArgs : EventArgs
  {
    internal ContentSection contentSection;
    /// <summary>
    /// Gets or sets the output content.
    /// </summary>
    /// <remarks>
    /// This is where a plugin's output is saved to.
    /// </remarks>                                  
    public abstract string Content { get; set; }

    /// <summary>
    /// Initialises the instance when called from a derived type.
    /// </summary>
    /// <param name="contentManager">The <see cref="FlickrXplorer.Web.Plugin.ContentManager" text="ContentManager" />
    ///                              linked to this event.</param>                                                   
    public PluginEventArgs(ContentSection contentSection)
    {
      this.contentSection = contentSection;
    }
  }
}
